package cn.biplam.common.client.paging;

import cn.biplam.common.client.Database;
import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.common.wrapper.sqlresult.SqlResult;

/**
 * MySql分页实现
 * @author WangSong 2009-8-7上午10:27:57
 * @version 1.0
 */
public class PagingMySql extends PagingCommen{
	
	public SqlResult getPaging(Database database,String sql,int start,int end) throws ErrorMessage{
		StringBuilder pagingSelect = new StringBuilder();
		pagingSelect.append(sql); 
		pagingSelect.append(" limit "+start+", "+end+""); 
		return new PagingFactory(null).execute(database,pagingSelect.toString());
	}
}
